﻿using Google.Analytics.Model;
using Google.Analytics.Model.Feeds;
using Google.Analytics.Model.Queries;

namespace Google.Analytics.BusinessLogic.IDataAccess
{
    /// <summary>
    /// Interface for analytics data layer
    /// </summary>
    public interface IAnalyticsDa
    {
        /// <summary>
        /// Authenticates user and creates <see cref="AuthState"/> object with <c>AuthenticationToken</c>
        /// </summary>
        /// <param name="state">authentication state</param>
        /// <returns><see cref="AuthState"/> object with authenticated token</returns>
        AuthState Authenticate(AuthState state);

        /// <summary>
        /// Retreive <see cref="AccountFeed"/> data from Google Analytics
        /// </summary>
        /// <param name="query">account query</param>
        /// <returns></returns>
        AccountFeed GetAccountFeed(AccountQuery query);

        /// <summary>
        /// Retrieve <see cref="DataFeed"/> data from Google Analytics
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataFeed GetDataFeed(DataQuery query);
    }
}
